import 'package:base_plugin/base_plugin.dart';
import 'package:finance_app/generated/a.dart';
import 'package:finance_app/src/common/app_colors.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

mixin RadioMixin {
  bool get isSelect;

  bool get isEnable => true;

  Widget get buildSelectWidget => IndexedStack(
        children: [
          SvgPicture.asset(
            isEnable
                ? A.assetsImagesStyleSelectedBlue
                : A.assetsImagesStyleSelected,
            width: getDp(22),
            height: getDp(22),
            fit: BoxFit.contain,
          ),
          SvgPicture.asset(
            isEnable
                ? A.assetsImagesStyleDeselectedBlue
                : A.assetsImagesStyleDeselected,
            width: getDp(22),
            height: getDp(22),
            fit: BoxFit.contain,
          ),
        ],
        index: isSelect ? 0 : 1,
      );
}
